Reading Week Consolidation

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

geom_smooth

{GGPLOT2}

Generates a smoothed conditional means curve / line

summary

{base}

Obtain summary statistics or detailed regression output

ggplot

{GGPLOT2}

Create a ggplot graph

with

{base}

evaluate expression in the context of a data frame

mutate

{dplyr}

Modify/create a column in a data frame

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

library

{base}

Load an R package

ordered

{dplyr}

Create an ordered factor

chisq.test

{stats}

Chi-Squared test (e.g. for cross-tabulations)

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

ifelse

{base}

Return a or b depending on the value of test

c

{base}

Combine values/vectors into a vector

cut

{base}

Convert Numeric to Factor

lm

{base}

Fit a linear model

setwd

{base}

Set Working Directory

leveneTest

{car}

Computes Levene’s test for homogeneity of variance across groups.

prop.test

{stats}

Test of Equal or Given Proportions

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

geom_point

{GGPLOT2}

Generates a scatter plot

read_dta

{haven}

Read a .dta file (Stata data)

attach

{base}

Attach Set of R Objects to Search Path

read_excel

{readxl}

Read an Excel file

The end!